<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="UTF-8">
    <title>添加消息，推送给客户</title>
    <script type="text/javascript" src="./jquery-1.12.4.js"></script>
</head>
<body>
<form method="get">
    消息内容：<input type="text" id="name" name="请输入消息内容">
    <input type="submit" id="message" value="提交">

</form>
</body>
<script>
var ws = new WebSocket("ws://10.211.55.6:9501");
$("#message").click(function(){
    //得到文本内容
var content =$("#name").val();
//将内容发送给服务器
    ws.send(content);
});
</script>
</html>